package com.material.factory.service.impl;

import java.util.List;
import com.material.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.material.factory.mapper.FactorySupplierConfigMapper;
import com.material.factory.domain.FactorySupplierConfig;
import com.material.factory.service.IFactorySupplierConfigService;

/**
 * 工厂供应商预约燃料比例分配Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class FactorySupplierConfigServiceImpl implements IFactorySupplierConfigService 
{
    @Autowired
    private FactorySupplierConfigMapper factorySupplierConfigMapper;

    /**
     * 查询工厂供应商预约燃料比例分配
     * 
     * @param id 工厂供应商预约燃料比例分配主键
     * @return 工厂供应商预约燃料比例分配
     */
    @Override
    public FactorySupplierConfig selectFactorySupplierConfigById(Long id)
    {
        return factorySupplierConfigMapper.selectFactorySupplierConfigById(id);
    }

    /**
     * 查询工厂供应商预约燃料比例分配列表
     * 
     * @param factorySupplierConfig 工厂供应商预约燃料比例分配
     * @return 工厂供应商预约燃料比例分配
     */
    @Override
    public List<FactorySupplierConfig> selectFactorySupplierConfigList(FactorySupplierConfig factorySupplierConfig)
    {
        return factorySupplierConfigMapper.selectFactorySupplierConfigList(factorySupplierConfig);
    }

    /**
     * 新增工厂供应商预约燃料比例分配
     * 
     * @param factorySupplierConfig 工厂供应商预约燃料比例分配
     * @return 结果
     */
    @Override
    public int insertFactorySupplierConfig(FactorySupplierConfig factorySupplierConfig)
    {
        factorySupplierConfig.setCreateTime(DateUtils.getNowDate());
        return factorySupplierConfigMapper.insertFactorySupplierConfig(factorySupplierConfig);
    }

    /**
     * 修改工厂供应商预约燃料比例分配
     * 
     * @param factorySupplierConfig 工厂供应商预约燃料比例分配
     * @return 结果
     */
    @Override
    public int updateFactorySupplierConfig(FactorySupplierConfig factorySupplierConfig)
    {
        return factorySupplierConfigMapper.updateFactorySupplierConfig(factorySupplierConfig);
    }

    /**
     * 批量删除工厂供应商预约燃料比例分配
     * 
     * @param ids 需要删除的工厂供应商预约燃料比例分配主键
     * @return 结果
     */
    @Override
    public int deleteFactorySupplierConfigByIds(Long[] ids)
    {
        return factorySupplierConfigMapper.deleteFactorySupplierConfigByIds(ids);
    }

    /**
     * 删除工厂供应商预约燃料比例分配信息
     * 
     * @param id 工厂供应商预约燃料比例分配主键
     * @return 结果
     */
    @Override
    public int deleteFactorySupplierConfigById(Long id)
    {
        return factorySupplierConfigMapper.deleteFactorySupplierConfigById(id);
    }
}
